//
//  circleDetailModel.swift
//  OnceNectar
//
//  Created by Zhang Dream on 17/06/2018.
//  Copyright © 2018 com.inwhoop. All rights reserved.
//

import Foundation

import MappingAce
import SwiftyJSON
struct CircleDetailModel:Mapping {
    
    var activity : String?
    var beJoined :String?
    var browse :String?
    var circleName :String?
    var circleRemark :String?
    var circleUserCount :String?
    var content :String?
    var coverPath :String?
    var created :String?
    var creator :String?
    var creatorName :String?
    var friend :String?
    var id :String?
    var jointId : String?
    var labelId :String?
    var share :String?
    var status :String?
    var statusName :String?
    var updated :String?
    var updator :String?
    var updatorName :String?
    
    var circleUserForApp: [circleUserModel]?
    var circleUsers: [circleUserModel]?
    
    //    var author:InterestMarkModel?
    
}
//-"channel": {
//    "id": 1,
//    "name": "科普",
//    "ascription": "article"
//},

extension CircleDetailModel{
    mutating func initLabelCircleUserForApp(arr: [JSON]) {
        var xlabers :[circleUserModel] = []
        for object in arr {
            
            let xmodel = circleUserModel(fromDic: object.dictionary! )
            
            xlabers.append(xmodel)
        }
        circleUserForApp = xlabers
    }
    
    mutating func initCircleUsers(arr: [JSON]) {
        var xlabers :[circleUserModel] = []
        for object in arr {
            
            let xmodel = circleUserModel(fromDic: object.dictionary! )
            
            xlabers.append(xmodel)
        }
        circleUsers = xlabers
    }
    
}
